// 商家信息
import {
	defineStore
} from 'pinia';
import {
	ref
} from 'vue';

const brandObj = uniCloud.importObject('mall-brand');

export const brandStore = defineStore('brands', () => {
	const brandList = ref();
	const brandId = ref();
	const getData = async (pid) => {
		let res = await brandObj.getShopBrand(pid);
		brandList.value = res.data[0];
		return brandList.value;
	}
	return {
		brandId,
		brandList,
		getData
	}
});